/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package view;
import javafx.scene.Group;
import javafx.scene.control.TextBox;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
import javafx.scene.Cursor;

/**
 * @author Sik
 */

public class Slot extends Group{

    public-init var num : Integer;
    public-init var x : Integer;
    public-init var y : Integer;
    public var pic : String;
    public var pseudo : TextBox =
        TextBox
            {
                translateY:200
                text: "Player {{num + 1}}"
                columns: 20
                selectOnFocus: true
                promptText: "Player {{num + 1}}"

            }

    var avatar : Image =
    bind Image
    {
        url : pic
        height:200
        width: 200
    }

    init
    {
        content =
        [
            Group
            {
                translateX: x
                translateY: y
                content :
                [
                    ImageView
                    {
                        cursor: Cursor.HAND
                        image : bind avatar
                    }

                    Rectangle
                    {
                        height: 200
                        width: 200
                        fill: null
                        stroke: Color.WHITE
                        strokeWidth: 4
                    }

                    pseudo
                ]
            }
        ]
    }
}
